#ifndef SYSOPENFILE_H
#define SYSOPENFILE_H

#include "openfile.h"
                // Temporarily implement calls to
                                        // Nachos file system as calls to UNIX!
                                        // See definitions listed under #else
class SysOpenFile {
  public:
    SysOpenFile(OpenFile* f, int tempId, char * tempName);	// open the file
    ~SysOpenFile();		// close the file

        int 		getAccessingProcesses();
		void 		decrementAccessingProcesses() {accessingProcesses--;}
		void 		incrementAccessingProcesses() {accessingProcesses++;}
		OpenFile* 	getFile() {return file; }
        int 		getFileID();
        char* 		getFileName();
  private:
    OpenFile* file;
    int id;
    char* fileName;
    int accessingProcesses;
};



#endif // SYSOPENFILE_H
